import api from "./index";

// 购物车相关接口
export default {
  // 加入购物车
  addShoppingCart: (params) => api.post("/applet/cart/saveUserCart", params),
  // 查询购物车
  getUserCart: () => api.get("/applet/cart/getUserCart"),
  // 删除购物车商品
  delCartProduct: (params) => api.get("/applet/cart/deleteUserCartProduct", params),
  // 清空购物车
  clearCart: () => api.get("/applet/cart/emptyUserCart"),
  // 增加商品数量
  plusProductNum: (params) => api.post("/applet/cart/plusUserCartNumber", params),
  // 减少商品数量
  reduceProductNum: (params) => api.post("/applet/cart/reduceUserCartNumber", params),
};
